package cn.com.zero.common.auth.security.service.impl;

import cn.com.zero.common.auth.security.po.AuthUserPO;
import cn.com.zero.common.auth.security.service.AbstractUserDetailsService;
import org.springframework.stereotype.Service;

/**
 * @author xiongxj
 * @version 1.0.0
 * @Description 根据手机号获取用户信息
 * @createTime 2023/3/21 10:02
 */
@Service
public class UserDetailsServiceMobile extends AbstractUserDetailsService {

    @Override
    public AuthUserPO getUser(String userPrincipal) {
        // 手机验证码登录时使用，需要根据手机号查询用户信息
        return loginAuthenticationService.getUserByMobile(userPrincipal);
    }

}
